This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Repository navigation
ci: pin only torch to the PyTorch index in the examples job - #402
Merged
Merged
Conversation
The examples job set UV_INDEX with unsafe-best-match, so uv asked download.pytorch.org about every package and a PyTorch 503 failed jobs that do not need torch. Run the examples in a throwaway uv project that marks the PyTorch CPU index explicit and pins torch alone to it, and raise UV_HTTP_RETRIES. Fixes #401. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tae898
force-pushed
the
ci/examples-torch-only-pytorch-index
branch
from
October 21, 2026 12:11
692f4c4 to
9bff3cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #401.
The examples job set
UV_INDEX=https://download.pytorch.org/whl/cpuwithUV_INDEX_STRATEGY=unsafe-best-match, so uv asked the PyTorch index about every package and a 503 there failed jobs that do not need torch (PR #391 and PR #395, on/whl/cpu/rich/and/whl/cpu/h11/). The "Install example dependencies" step now writes a minimal uv project to$RUNNER_TEMPthat lists the same packages and pins onlytorchto the PyTorch CPU index ([tool.uv.sources]plus an index withexplicit = true), and all four example steps runuv run --project "$EXAMPLE_PROJECT" --python <version> --with <wheel> python.--no-projectreads no[tool.uv.sources]and a requirements file cannot mark an index explicit, so a project is the mechanism that works here.UV_HTTP_RETRIESis raised from 3 to 6.ci-setup.mddescribes the new setup.Local check on the same package list (Python 3.12,
uv lock, then the step script run for real with the built wheel): the resolved versions are identical to the old setting (67 packages, no differences, torch 2.14.1+cpu, numpy 2.5.4, rich 15.0.0, h11 0.16.0).uv lock -v --no-cacheshows the PyTorch index queried for 1 package (torch) instead of 66, and numpy, rich, h11 and requests locked from pypi.org. The old setting also took five torch dependencies (jinja2, sympy, mpmath, colorama, typing-extensions) from the PyTorch index at the same versions; they now come from PyPI. actionlint,bash -non the extracted step and the pre-commit hooks pass. I did not run the examples, and CI has not run yet.🤖 Generated with Claude Code